package com.jinke.api.modules.third.dqpost.model.request;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

/**
 * 请求参数类
 */

@Data
@JsonSerialize
public class CreateOrderRequest {

    @JsonProperty("order_no")
    private String orderNo;
    @JsonProperty("service_code")
    private String serviceCode;
    private Address sender;
    private Address recipient;
    @JsonProperty("package")
    private MyPackage myPackage;
    @JsonProperty("insurance_value")
    private double insuranceValue;
    @JsonProperty("signature_type")
    private int signatureType;
    private String remark;
    // Constructor, getters, and setters
    @Data
    public static class Address {
        private String country;
        private String name;
        private List<String> address;
        private String city;
        private String state;
        private String zipcode;
        private String phone;

        // Constructor, getters, and setters
    }
    @Data
    public static class MyPackage {
        private String signatureType = "0";
        private List<PackageDimensions> dimensions;
    }
    @Data
    public static class PackageDimensions {
        private BigDecimal length;
        private BigDecimal width;
        private BigDecimal height;
        private BigDecimal weight;
    }

}

